package com.xvaca.spcms.bean;

public class SettlementBean {

	private String moAt; // 日期
	private String cmd; // 指令
	private String startAt;
	private String endAt;
	
	private String channelName;
	private int channelPrice;
	private int orderCount;
	private int orderTotalPrice;
	
	private String pipeName; // 渠道名称
	private int pipePrice; // 渠道单价
	private int syncCount; // 同步订购数
	private int pipeTotalPrice; // 渠道总价
	
	private int profit; // 利润
	private double profitPrecent; // 利润率
	
	public String getMoAt() {
		return moAt;
	}
	public void setMoAt(String moAt) {
		this.moAt = moAt;
	}
	public String getCmd() {
		return cmd;
	}
	public void setCmd(String cmd) {
		this.cmd = cmd;
	}
	public String getStartAt() {
		return startAt;
	}
	public void setStartAt(String startAt) {
		this.startAt = startAt;
	}
	public String getEndAt() {
		return endAt;
	}
	public void setEndAt(String endAt) {
		this.endAt = endAt;
	}
	public String getChannelName() {
		return channelName;
	}
	public void setChannelName(String channelName) {
		this.channelName = channelName;
	}
	public int getChannelPrice() {
		return channelPrice;
	}
	public void setChannelPrice(int channelPrice) {
		this.channelPrice = channelPrice;
	}
	public int getOrderCount() {
		return orderCount;
	}
	public void setOrderCount(int orderCount) {
		this.orderCount = orderCount;
	}
	public int getOrderTotalPrice() {
		this.orderTotalPrice = this.getOrderCount() * this.getChannelPrice();
		return orderTotalPrice;
	}
	public String getPipeName() {
		return pipeName;
	}
	public void setPipeName(String pipeName) {
		this.pipeName = pipeName;
	}
	public int getPipePrice() {
		return pipePrice;
	}
	public void setPipePrice(int pipePrice) {
		this.pipePrice = pipePrice;
	}
	public int getSyncCount() {
		return syncCount;
	}
	public void setSyncCount(int syncCount) {
		this.syncCount = syncCount;
	}
	public int getPipeTotalPrice() {
		this.pipeTotalPrice = this.getSyncCount() * this.getPipePrice();
		return pipeTotalPrice;
	}
	public int getProfit() {
		this.profit = this.getOrderTotalPrice() - this.getPipeTotalPrice();
		return profit;
	}
	public double getProfitPrecent() {
		if (this.getOrderTotalPrice() == 0) {
			return 0;
		}
		this.profitPrecent = (this.getProfit() * 100) / this.getOrderTotalPrice();
		return profitPrecent;
	}
	
	public String toYuan(int price) {
		return(String.valueOf(price / 100));
	}
	
	
	
	
	
}
